package package06章_面向对象编程_基础._07encapsulation封装性.exer1;/**
 * ClassName: PersonTEst
 * Package: package06章_面向对象编程_基础._07encapsulation封装性.exer1
 * Description:
 *
 * @Author lys
 * @Create 2024/2/16 20:04
 * @Version 1.0
 */

/**
 * @description: TODO
 * @author lys
 * @date 2024/2/16 20:04
 * @version 1.0
 */
public class PersonTest {
    public static void main(String[] args) {
        //创建Person实例1
        Person p1 = new Person();
//        p1.age = 10; //编译不通过
//        System.out.println(p1.age);

        p1.setAge(20);
        System.out.println(p1.getAge());

    }
}
